using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication11.Models.Mapping
{
    public class CABI_SurgeryMap : EntityTypeConfiguration<CABI_Surgery>
    {
        public CABI_SurgeryMap()
        {
            // Primary Key
            this.HasKey(t => t.CS_ID);

            // Properties
            this.Property(t => t.CS_Name)
                .HasMaxLength(50);

            // Table & Column Mappings
            this.ToTable("CABI_Surgery");
            this.Property(t => t.CS_ID).HasColumnName("CS_ID");
            this.Property(t => t.CS_Name).HasColumnName("CS_Name");
        }
    }
}
